#include<cstdio>
#include<cmath>
#include<cstring>
#include<algorithm>
using namespace std;
typedef long long ll;
const int maxn = 1000;
int main()
{
	int n=0,i=0;
	scanf("%d",&n);
	while(n!=1){
		if(n%2==1) n=(3*n+1)/2;
		else n/=2;
		i++;
	} 
    printf("%d\n",i);
	return 0;
}

